{extend name="Index/index" /}

{block name="main"}
<h2 style="margin-left:30px">
    用户管理
    <small>
        <i class="icon-double-angle-right"></i>
        <span style="color: deepskyblue;">分配角色</span>
    </small>
</h2>

    <div class="row" style="margin-left:20px">
        <div class="col-md-12">
            <p>
                给 <b>{$user.username}</b> 分配角色
            </p>

            <form action="{:url('admin/User/saverole')}" method='post'>
                <p style="width:600px">
                    {volist name="list" id="v"}
                        <input type="checkbox" name="role[]"  value="{$v.id}" {volist name="role" id="val"}{if $v['id']==$val['rid']}checked{/if}{/volist}>{$v.name}
                        &nbsp;
                        &nbsp;
                        &nbsp;
                    {/volist}
                </p>
                <input type="hidden" name="uid" value="{$user.id}">
                <input type="submit" value="保存" class="btn btn-primary">

            </form>

        </div>
    </div>

{/block}